<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript" src="../js/jquery-1.11.2.min.js" ></script>
	</head>
	<body>
		<ul id="title">
			<li>2</li>
			<li>3</li>
		</ul>
		<div id="content">
				<div>ss</div>
				<div style="display: none;">222</div>
		</div>
		<script>
			$("#title li").click(function(){
				var index=$(this).index();
				$("#title li:nth-of-type("+index+")").hide();
				$("#title li:nth-of-type("+(index+1)+")").show();
				$("#content div:nth-of-type("+index+")").hide();
				$("#content div:nth-of-type("+(index+1)+")").show();
			})
			
			
		</script>
	</body>
</html>
